package TestPaperSystem.utils.idGetter;

import TestPaperSystem.utils.email.CodeCreator;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class IdGetter {
    private static IdGetter instance;

    private static final String pattern = "yyyyMMddHHmmssS";

    public static IdGetter getInstance() {
        if(instance == null){
            instance = new IdGetter();
        }
        return instance;
    }

    public String getEntityId(){

        LocalDateTime time = LocalDateTime.now();

        return time.format(DateTimeFormatter.ofPattern(pattern));

    }
}
